<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt"  uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title><spring:message code="head.clothGarment"></spring:message>
	    -
	    <spring:message code="head.showTrack"></spring:message></title>
    <link href="${pageContext.request.contextPath }/phone/css/detail.css" rel="stylesheet" />
    <link href="${pageContext.request.contextPath }/phone/css/font/iconfont.css" rel="stylesheet" type="text/css">
</head>
<body>
    <div>
        <!--头部--有分类-->
        <div class="cate_header">
            <div class="putong_top">
                <a href="javascript:history.go(-1);"></a>
                <div><spring:message code="head.showTrack"></spring:message></div>
            </div>
        </div>
        <div role="main" class="main" style="background:#F0F0F2;padding-bottom:0px;">
           <div class="xcde">
               <div class="ad">
                   <img src="${pageContext.request.contextPath }/upload/compression/${show.img }" />
               </div>
               <c:if test="${not empty showPicList }">
               <div class="xczz">
                   <ul>
	                   <c:forEach items="${showPicList }" var="pList">
	                       <li style="background-image:url(${pageContext.request.contextPath }/upload/compression/${pList.img }"></li>
                       </c:forEach>
                       <div class="clr"></div>
                   </ul>
               </div>
               </c:if>
               <!--秀场花型-->
               <c:if test="${not empty pList }">
               <div class="huaxing">
                    <ul>
	                    <c:forEach items="${pList }" var="p">
	                        <li>
	                            <a href="javascript:xiangqing('${p.isVip}','${p.pId}')">
	                                <div class="img_squre" style="background-image:url(${p.pImg });"></div>
	                                <span><spring:message code="pattern.no"></spring:message>${p.pNo }</span>
	                                <br/>
	                                <span><spring:message code="pattern.size"></spring:message>${p.chicun }
		                                <c:if test="${p.isVip==2 }">
			                            <i>VIP</i>
			                            </c:if>
	                                </span>
	                                
	                            </a>
	                        </li>
                        </c:forEach>
                       <div class="clr"></div>
                       <c:if test="${page.totalPage>1 }">
	                    <button type="button" class="before-page" <c:if test="${page.page==1 }">disabled</c:if> onclick="gotoPage(${page.page-1 });"><spring:message code="fabricCatalogue.previousPage"></spring:message></button>
	                    <button type="button" class="next-page" <c:if test="${page.page>=page.totalPage || page.totalPage==0||page.totalPage==1 }">disabled</c:if> onclick="gotoPage(${page.page+1 });"><spring:message code="fabricCatalogue.nextPage"></spring:message></button>
	                    </c:if>
                      </ul>
                 </div>
                 </c:if>
           </div>
        </div>
        <!--列表 end-->
	    <form action="${pageContext.request.contextPath }/api/show/details" method="get" id="pageForm">
			 <input type="hidden" id="currentPage" name="page" value="${page.page}"/>
			 <input type="hidden" id="sId" name="sId" value="${show.id }"/>
	    </form>
   </div>
   <script type="text/javascript" src="${pageContext.request.contextPath }/web/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/h-ui/lib/layer/layer_mobile/layer.js"></script>
<script type="text/javascript">
function gotoPage(pagenum){
  $("#currentPage").val(pagenum);
  $("#pageForm").submit();
}
function xiangqing(vip,patternId){
	if(vip==2){
	$.ajax({url:'${pageContext.request.contextPath }/web/patternfilter/judge', async : false,type : "POST",  success :function(result){
		 var status=result.msg.status;
		 var desc=result.msg.desc;
		    if(status == 1){//没登录
		    	/* layer.confirm('<spring:message code="flowertypecatalog.notLogin"></spring:message>', {
	        	  btn: ['<spring:message code="flowertypecatalog.agreed"></spring:message>','<spring:message code="flowertypecatalog.unagree"></spring:message>'], //按钮
	        	  title:'<spring:message code="flowertypecatalog.message"></spring:message>'
	        	}, function(index){
	        		location.href="${pageContext.request.contextPath}/api/toPhonePage/login";
	        	},function(index){
	        		
	        	}); */
		    	layer.open({
       			    content: '<spring:message code="flowertypecatalog.notLogin"></spring:message>'
       			    ,btn: ['<spring:message code="reciveAddress.confirm"></spring:message>', '<spring:message code="reciveAddress.cancel"></spring:message>']
       			    ,yes: function(index){
       			    	location.href="${pageContext.request.contextPath}/api/toPhonePage/login";
       			      layer.close(index);
       			    }
       			  });
		    	flag=true;
		    }else if(status ==2){
		    	/* layer.confirm('<spring:message code="flowertypecatalog.applyForVIP"></spring:message>', {
		        	  btn: ['<spring:message code="flowertypecatalog.agreed"></spring:message>','<spring:message code="flowertypecatalog.unagree"></spring:message>'], //按钮
		        	  title:'<spring:message code="flowertypecatalog.message"></spring:message>'
		        	}, function(index){
		        		location.href="${pageContext.request.contextPath}/api/toPhonePage/applyForVip";
		        		layer.close(index);
		        	},function(index){
		        		layer.close(index);
		        	}); */
		    	layer.open({
       			    content: '<spring:message code="flowertypecatalog.applyForVIP"></spring:message>'
       			    ,btn: ['<spring:message code="reciveAddress.confirm"></spring:message>', '<spring:message code="reciveAddress.cancel"></spring:message>']
       			    ,yes: function(index){
       			    	location.href="${pageContext.request.contextPath}/api/toPhonePage/applyForVip";
       			      layer.close(index);
       			    }
       			  });
		    	
		    }else{
		    	top.location.href='${pageContext.request.contextPath}/api/toPhonePage/patternShiyi?id='+patternId;
		    }
	  	}
	});
	}else{
		$.ajax({url:'${pageContext.request.contextPath }/web/patternfilter/judge', async : false,type : "POST",  success :function(result){
   			 var status=result.msg.status;
   			 var desc=result.msg.desc;
   			    if(status == 1){//没登录
   			    	/* layer.confirm('<spring:message code="flowertypecatalog.notLogin"></spring:message>', {
   			        	  btn: ['<spring:message code="flowertypecatalog.agreed"></spring:message>','<spring:message code="flowertypecatalog.unagree"></spring:message>'], //按钮
   			        	title:'<spring:message code="flowertypecatalog.message"></spring:message>'
   			        	}, function(index){
   			        		location.href="${pageContext.request.contextPath}/api/toPhonePage/login";
   			        	},function(index){
   			        		
   			        	}); */
   			    	layer.open({
   	       			    content: '<spring:message code="flowertypecatalog.notLogin"></spring:message>'
   	       			    ,btn: ['<spring:message code="reciveAddress.confirm"></spring:message>', '<spring:message code="reciveAddress.cancel"></spring:message>']
   	       			    ,yes: function(index){
   	       			    	location.href="${pageContext.request.contextPath}/api/toPhonePage/login";
   	       			      layer.close(index);
   	       			    }
   	       			  });
   			    	
   			    }else{
   			    	top.location.href='${pageContext.request.contextPath}/api/toPhonePage/patternShiyi?id='+patternId;
   			    }
	}
});
	}
}
</script>
</body>
</html>
